<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>记录详情</title>
    <script src="{{ asset('js/common.js') }}?v=202006131149" type="text/javascript"></script>
    <link rel="stylesheet" href="{{ asset('css/bootstrap.min.css') }}">
    <script src="{{ asset('js/jquery.min.js') }}" type="text/javascript"></script>
    <script src="{{ asset('js/bootstrap.min.js') }}" type="text/javascript"></script>
    <script src="{{ asset('js/ewin.js') }}" type="text/javascript"></script>
    <script src="{{ asset('js/jquery.qrcode.min.js') }}" type="text/javascript"></script>

    <!-- Styles -->
    <style>
        .base-info input {
            font-size: 16px;
        }
        .account-input input {
            font-size: 16px;
            height: 32px;
            width: 60%;
        }
        .query-account .item {
            width: 100%;
            margin-top: 10px;
            font-size: 16px;
            display:  flex;
            height: 32px;
            line-height: 32px;
            border-bottom: 1px solid #DBDBDB;
            flex-direction: row;
            justify-content: space-between;
            align-items: center;
        }

        .query-account .account-info {
            margin-top: 20px;
            height: 50px;
            font-size: 16px;
            text-align: center;
        }


        .query-account .account-right input{
            width: 80%;
        }
        .query-account .left {
            padding-left: 30px;
            color: #777;
        }

        .query-account .right {
            padding-right: 30px;
            font-size: 16px;
            color: #000000;
        }

        .item .fa-tag{
            position: relative;
            top: -2px;
            right: 3px;
        }
        h4{
            height: 32px;
            color: #000;
            line-height: 32px;
            margin-left: 10px;
        }
        #code{margin-top:20px}
        .btn-success{
            color: #fff;
            background-color: #FF6A00;
            border-color: #FF6A00;
        }
        .btn-info{
            color: #fff;
            background-color: #FF6A00;
            border-color: #FF6A00;
        }

    </style>
</head>
<body>
<div class='query-account' style='display:block;'>
    <div class="package-box">
        <h4>基本信息</h4>
        <div style="border:1px solid #ddd;background:#FFF;">
            <div class='item'>
                <div class='left'>订单号</div>
                <div class='right out_trade_no'>{{$data['out_trade_no']}}</div>
            </div>
            @if($data['admin_openid'])
            <div class='item' class="admin-look">
                <div class='left'>Provider</div>
                @if($data['ti_provider']==1)
                    <div class='right provider'>SH</div>
                @elseif($data['ti_provider']===2)
                    <div class='right provider' >CUHK</div>
                @elseif($data['ti_provider']==3)
                    <div class='right provider'>SMT</div>
                @elseif($data['ti_provider']==4)
                    <div class='right provider'>CHKT</div>
                @elseif($data['ti_provider']==5)
                    <div class='right provider'>CSL</div>
                @elseif($data['ti_provider']==6)
                    <div class='right provider'>3HK</div>
                @elseif($data['ti_provider']==7)
                    <div class='right provider'>APT</div>
                @elseif($data['ti_provider']==8)
                    <div class='right provider'>BICS</div>
                @elseif($data['ti_provider']==9)
                    <div class='right provider'>AIS</div>
                @elseif($data['ti_provider']==10)
                    <div class='right provider'>ORG</div>
                @elseif($data['ti_provider']==11)
                    <div class='right provider'>CMCC</div>
                @elseif($data['ti_provider']==12)
                    <div class='right provider'>TEST</div>
                @elseif($data['ti_provider']==50)
                    <div class='right provider'>BICS_EX</div>
                @elseif($data['ti_provider']==51)
                    <div class='right provider'>CITIC_EX</div>
                @elseif($data['ti_provider']==52)
                    <div class='right provider'>CUHK_EX</div>
                @elseif($data['ti_provider']==53)
                    <div class='right provider'>IPLOOK_EX</div>
                @endif
            </div>
            <div class='item' class="admin-look">
                <div class='left'>IMSI</div>
                <div class='right imsi'>{{$data['vc_imsi']}}</div>
            </div>
            @endif
            <div class='item'>
                <div class='left'>卡号</div>
                <div class='right account'>{{$data['vc_account']}}</div>
            </div>
            <div class='item'>
                <div class='left'>套餐ID</div>
                <div class='right productId'>{{$data['i_product_id']}}</div>
            </div>
            <div class='item'>
                <div class='left'>套餐</div>
                <div class='right productName'>{{$data['vc_product_name']}}</div>
            </div>
            <div class='item'>
                <div class='left'>套餐价格</div>
                <div class='right price'>{{$data['product_price']}}</div>
            </div>
            <div class='item'>
                <div class='left'>类型</div>
                @if($data['ti_type']==1)
                <div class='right type'>充值</div>
                @elseif($data['ti_type']==2)
                <div class='right type'>购买</div>
                @endif
            </div>
            <div class='item'>
                <div class='left'>支付金额</div>
                <div class='right total_fee'><span class="fa-tag">-</span>{{$data['amount']}}</div>
            </div>
            <div class='item'>
                <div class='left'>状态</div>
                @if($data['ti_status']==1)
                <div class='right status' style="color: green">交易成功</div>
                @elseif($data['ti_status']===0)
                    <div class='right status' style="color: red">交易失败</div>
                @elseif($data['ti_status']===null)
                    <div class='right status' style="color: red">交易取消</div>
                @endif
            </div>
            {{--<div class='item' style="border:none">--}}
                {{--<div class='left'>描述</div>--}}
                {{--<div class='right description'>{{$data['te_description']}}</div>--}}
            {{--</div>--}}
        </div>
    </div>

    {{--@if($data['mail_id'])--}}
    {{--<div class="package-box">--}}
        {{--<h4>邮寄信息</h4>--}}
        {{--<div style="border:1px solid #ddd;background:#FFF;">--}}
        {{--<div class='item'>--}}
            {{--<div class='left'>收件人</div>--}}
            {{--<div class='right username'>{{$data['user_name']}}</div>--}}
        {{--</div>--}}
        {{--<div class='item'>--}}
            {{--<div class='left'>电话号</div>--}}
            {{--<div class='right tel_number'>{{$data['tel_number']}}</div>--}}
        {{--</div>--}}
        {{--<div class='item'>--}}
            {{--<div class='left'>邮编</div>--}}
            {{--<div class='right postal_code'>{{$data['postal_code']}}</div>--}}
        {{--</div>--}}
        {{--<div class='item'>--}}
            {{--<div class='left'>详情地址</div>--}}
            {{--<div class='right address-detail'>{{$data['province_name']}}{{$data['city_name']}}{{$data['country_name']}}{{$data['detail_info']}}</div>--}}
        {{--</div>--}}
        {{--</div>--}}
    {{--</div>--}}
    @if($data['esim_url'])
    <div class="package-box">
        <h4>ESIM信息</h4>
        <div style="border:1px solid #ddd;background:#FFF;">
            <div class="esim-content" style="height: 200px;padding: 20px;display:flex;justify-content: center;align-items: center;">
                <div id="code"></div>
                <img id='imgOne' style="width: 150px;height: 150px;"/>
            </div>

        </div>
    </div>
    @endif
    <div class="clear" style="height: 50px;width: 100%;"></div>
</div>
<!-- loading -->
<div class="modal fade" id="loading" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" data-backdrop='static'>
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <h4 class="modal-title" id="myModalLabel">提示</h4>
            </div>
            <div class="modal-body">
                正在加载，请稍候...<span id="result"></span>
            </div>
        </div>
    </div>
</div>
<!--模态框组件-->
<div class="modal fade" id="myModal" style="margin-top: 50px;">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <h3>提示</h3>
            </div>
            <div class="modal-body">
                <p id="message-content"></p>
            </div>
            <div class="modal-footer">
                <button class="btn btn-info" data-dismiss="modal">关闭</button>
            </div>
        </div>
    </div>
</div>
</body>
</html>
<script>
    var esim_url = '{{$data['esim_url']}}';
    if(esim_url){
        $("#code").empty();
        var url = esim_url;
        $('#imgOne').attr('src', url);
        // var content = toUtf8(url);
        // var qrcode= $('#code').qrcode(content).hide();
        // var canvas=qrcode.find('canvas').get(0);
        // $('#imgOne').attr('src',canvas.toDataURL('image/jpg'));
    }
   
</script>

